﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace BPMS.Core.DataAccess
{
    public class DbParameterWrapper
    {

        /// <summary>
        /// Name
        /// </summary>
        public string ParameterName { get; set; }

        /// <summary>
        /// Value
        /// </summary>
        public object ParameterValue { get; set; }

        /// <summary>
        /// Size
        /// </summary>
        public int ParameterSize { get; set; }

        /// <summary>
        /// Direction
        /// </summary>
        public ParameterDirection Direction { get; set; }

        /// <summary>
        /// DbParameterWrapper
        /// </summary>
        public DbParameterWrapper()
        { }

        /// <summary>
        /// DbParameterWrapper
        /// </summary>
        /// <param name="name"></param>
        /// <param name="value"></param>
        public DbParameterWrapper(string name, object value)
        {
            this.ParameterName = name;
            this.ParameterValue = value;
        }

        /// <summary>
        /// DbParameterWrapper
        /// </summary>
        /// <param name="name"></param>
        /// <param name="value"></param>
        /// <param name="size"></param>
        public DbParameterWrapper(string name, object value, int size)
            : this(name, value)
        {
            this.ParameterSize = size;
        }

        /// <summary>
        /// DbParameterWrapper
        /// </summary>
        /// <param name="name"></param>
        /// <param name="value"></param>
        /// <param name="direction"></param>
        public DbParameterWrapper(string name, object value, ParameterDirection direction)
            : this(name, value)
        {
            this.Direction = direction;
        }

        /// <summary>
        /// DbParameterWrapper
        /// </summary>
        /// <param name="name"></param>
        /// <param name="value"></param>
        /// <param name="size"></param>
        /// <param name="direction"></param>
        public DbParameterWrapper(string name, object value, int size, ParameterDirection direction)
            : this(name, value, size)
        {
            this.Direction = direction;
        }
    }
}
